package cn.neusoft.feignClients;

import cn.neusoft.domain.Allocate;
import cn.neusoft.domain.Task;
import cn.neusoft.feignClients.fallback.DeliveryFeignClientFallback;
import cn.neusoft.interceptor.FeignInterceptor;
import cn.neusoft.query.AllocationQuery;
import cn.neusoft.vo.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "delivery-server",fallback = DeliveryFeignClientFallback.class, configuration = FeignInterceptor.class)
public interface DeliveryFeignClient {
    @PostMapping("/allocate/update")
    ResultBean updateAllocate(@RequestBody Allocate allocate);

    @PostMapping("/allocate/getByPage")
    ResultBean FindAllocateByPages(@RequestBody AllocationQuery query);

    @PostMapping("/allocate/findReturnedAllocate")
    ResultBean findReturnedAllocate(@RequestBody AllocationQuery query);

    @PostMapping("/allocate/AddAnyway")
    ResultBean AddAllocateAnyway(@RequestBody Allocate allocate);

    @PutMapping("/task/updateTask")
    ResultBean update(@RequestBody Task task);

    @PostMapping("/allocate/Add")
    ResultBean AddAllocate(@RequestBody  Allocate allocate);


}
